package com.onemile.utils;

public class UniCodeConvert
{
	public static String UnicodeToGBK2(String s)
	{
		String[] k = s.split(";");
		String rs = "";
		for (int i = 0; i < k.length; i++)
		{
			int strIndex = k[i].indexOf("&#");
			String newstr = k[i];
			if (strIndex > -1)
			{
				String kstr = "";
				if (strIndex > 0)
				{
					kstr = newstr.substring(0, strIndex);
					rs += kstr;
					newstr = newstr.substring(strIndex);
				}
				int m = Integer.parseInt(newstr.replace("&#", ""));
				char c = (char) m;
				rs += c;
			}
			else
			{
				rs += k[i];
			}
		}
		return rs;
	}
}